<template>
  <div class="membership">
    <Header :showClose="false" title="会员专区" :showSetting="true"/>
    <div class="membership_content">
      <div class="userInfo_box">
        <div class="photo">
          <img src="../assets/用户 访客数.png" alt="" />
        </div>
        <div class="userInfo">
          <div class="companyName">福建电机工程(单位名称)</div>
          <div class="userInfo">
            <span>姓名:</span>
            <span>张三</span>
          </div>
          <div class="phone">
            <span>手机:</span>
            <span>188888888</span>
          </div>
        </div>
        <button class="userTitle" @click="goUserInfo">个人信息</button>
      </div>
    </div>
    <!-- 未缴纳会费 -->
    <div class="noMembership">
      <div class="noTitle">未缴纳会费</div>
      <div class="table">
        <div class="tableHander">
          <div class="item">期费</div>
          <div class="item">金额</div>
          <div class="item">类型</div>
        </div>
        <table border="0">
          <tr>
            <td>2021年会员费用</td>
            <td>￥23.75</td>
            <td>远远缴纳</td>
          </tr>
          <tr>
            <td>Bill Gates</td>
            <td>555 77 854</td>
            <td>555 77 855</td>
          </tr>
        </table>
        <div class="MembershipBtn">
          <button @click="goPayment">缴费</button>
        </div>
      </div>
    </div>
    <!-- 已缴纳会费 -->
    <div class="noMembership">
      <div class="noTitle">已缴纳会费</div>
      <div class="table">
        <div class="tableHander">
          <div class="item">期费</div>
          <div class="item">金额</div>
          <div class="item">缴纳时间</div>
        </div>
        <table border="0">
          <tr>
            <td>2021年会员费用</td>
            <td>￥23.75</td>
            <td>远远缴纳</td>
          </tr>
          <tr>
            <td>Bill Gates</td>
            <td>555 77 854</td>
            <td>555 77 855</td>
          </tr>
        </table>
        <div class="MembershipBtn">
          <button @click="goPaymenTrecord">查看</button>
        </div>
      </div>
    </div>
    <div class="tabBar">
      <div class="tabBarItemBox" v-for="(item,index) in tabBarData" :key="index">
        <div class="tabBarItem" @click="goPage(item.path)"></div>
        <span>{{item.name}}</span>
      </div>
    </div>
  </div>
</template>

<script>
import Header from "../components/header";
export default {
  name: "membership",
  data() {
    return {
      tabBarData: [
        {
          name: "会员缴费",
          path: "/payment"
        },
        {
          name: "缴费记录",
          path: "/paymenTrecord"
        },
        {
          name: "会员申请",
          path: "/workAmend"
        },
      ],
    };
  },
  components: {
    Header,
  },
  methods: {
      goPage(path) {
      this.$router.push(path);
      },
      goPayment() {
      this.$router.push("/payment");
      },
      goPaymenTrecord() {
      this.$router.push("/paymenTrecord");
      },
      goUserInfo() {
      this.$router.push("/userInfo");
      }
  },
};
</script>

<style lang="less">
.membership_content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.userInfo_box {
  width: 350px;
  height: 120px;
  border: 1px solid #8c8c8c;
  display: flex;
  align-items: center;
  position: relative;
  .photo {
    img {
      margin-left: 10px;
      width: 50px;
    }
    margin-right: 5px;
  }
  .userInfo {
    margin: 5px 0 5px 0;
  }
  .userTitle {
    width: 80px;
    height: 20px;
    background: #169bd5;
    color: #fff;
    position: absolute;
    top: 0;
    right: 0;
    border-radius: 4px;
  }
}
// 未缴纳会费
.noMembership {
  margin-top: 10px;
  .noTitle {
    width: 120px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    border-bottom: 3px solid #333333;
  }
  .table {
    .tableHander {
      width: 375px;
      display: flex;
      height: 30px;
      line-height: 30px;
      .item {
        flex: 1;
        text-align: center;
      }
      border-bottom: 1px solid #cccccc;
      margin-bottom: 3px;
    }
    table {
      width: 100%;
      border-top: 1px;
      tr {
        width: 100%;
        text-align: center;
        td {
          height: 30px;
        }
      }
    }
    .MembershipBtn {
      display: flex;
      justify-content: flex-end;
      button {
        width: 60px;
        height: 30px;
        background: #169bd5;
        color: #fff;
        border-radius: 4px;
        margin-right: 25px;
      }
    }
  }
}
// 导航
.tabBar {
  position: fixed;
  bottom: 50px;
  width: 375px;
  display: flex;
  justify-content: center;
  .tabBarItemBox {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    .tabBarItem {
      width: 40px;
      height: 40px;
      border-radius: 20px;
      border: 1px solid #cccccc;
      margin-bottom: 5px;
    }
  }
}
</style>